/**
 * Created by charlie on 18-1-16.
 */
import React from 'react'
import {connect} from 'dva-no-router'
import {bindActionCreators} from 'redux'
import {View} from 'react-native'
import UI from '../components/dialog/index'

class DialogTip extends React.Component {
    componentWillUnmount(){
        const {thisInit}=this.props;
        thisInit();
    }
    render(){
        return(
            <UI  {...this.props} />
        )
    }
}

const actions ={
    thisCancled:() =>({type:'thisDialog/thisCancled'}),
    thisSure:() =>({type:'thisDialog/thisSure'}),
    thisInit:() =>({type:'thisDialog/thisInit'})
};
const mapProps = ({thisDialog}) =>({thisDialog});
const mapActions = dispatch =>({
    ...bindActionCreators({...actions},dispatch)
});
export default connect (mapProps,mapActions)(DialogTip)